<?php
$this->pageTitle=Yii::app()->name . ' - Check Korea black list';

$this->breadcrumbs=array(

	'Check Korea black list',

);

?>


<style>

.i-info{
margin-left:160px;
width:850px;
}

.i-info td{
width: 20px;
}

.border {
    padding: 1px;
    width: 80%;
	height: 70px;
    margin: auto;
    border:none;
    border-radius: 5px;
    background: #FAFAFA;
}

.border input{
float: left;
}

.border input[type='text']{
    font-size: 30px;
    padding-left: 4px;    
     width: 280px;
}
.border input[type='submit']{
	background:  #008BFF;
    color: #E0E5E9;
    height: 42px;
    width: 80px;
    font-size: 20px;
    border-radius: 0px;
    padding: 5px;
}

.border input[type='submit']:hover{
background:  #005CCC;
}

.mtable tr{
border-top: 1px solid black;
}

.mtable{
width: 85%;
border: 1px solid #DBDBDB;
margin:auto;
margin-top: 15px;
 border-radius: 5px;
}
.mtable .row1{
background: #E3F7F1;
}
</style>

<script>
$(document).ready(function(){

	
});

function getresult(){
	$("#LoadingImage").show();
	var vimei = $("#ImeiForm_imei").val();
	$.ajax({
	    url: 'resultblacklist',
	    type: 'POST',
	    dataType: 'JSON',
	    data: {imei: vimei, typeapi: '<?php echo $typeapi;?>'},
	    success: function(result){
	    	$("#LoadingImage").hide();
	    	$("#divresult").html(result);
		}, 
	    error: function (xhr, status) {  
          $("#LoadingImage").hide();
          $("#divresult").html(status);
	   	} 
	});
}
</script>



<div style="margin:20px">

<?php if(Yii::app()->user->hasFlash('contact')): ?>



<div class="flash-success">

	<?php echo Yii::app()->user->getFlash('contact'); ?>

</div>



<?php else: ?>



<div class="form">



<?php $form=$this->beginWidget('CActiveForm', array(

	'id'=>'contact-form',

	'enableClientValidation'=>true,

	'clientOptions'=>array(

		'validateOnSubmit'=>true,

	),

)); ?>


<div class="border" style='height: 400px;'>
	<p align="center">
	<font size="3">
	<br>
	Check IMEI iPhone Carrier, Network &amp; Simlock - Full Info
	<span style="color: #999999;"><br>
	Kiểm tra thông tin nguồn gốc Iphone, bị khóa bởi nhà mạng nào & trạng thái khóa
</span><br>
	Nhận kết quả phản hồi ngay lập tức<br>
	<b><br>
	</b></font><b><font size="4">
	<font color="#005CCC">1Check</font> = <font color="#009933">0.25Credit </font>=<font color="#009933"> </font> 
	<font color="#CC3300">5.000Vn&#273;</font></font></b><font size="4"><br></font>
	<img src=<?php echo MyConstans::getHostResourcepath()."apple.png" ;?>>
	</p>

		<div style='margin-top:15px; margin-left: 170px;'>
		
				<?php echo $form->textField($model,'imei', array('placeholder'=>"Enter IMEI")); ?>		
				<input type='button' id="submit" value='Check' onclick='getresult();'>
		</div>
	</div>
	<!-- loading -->
<div id="LoadingImage" style="display: none;">
<center><img src='<?php echo Yii::app()->request->baseUrl; ?>/images/loading.gif' /></center>
</div>
	<!-- end loading -->
<div style='width: 100%; height: 380px; margin-top: 20px;' id='divresult'>

	<?php 
	if($model->error == '' && $model->result != ''){
	?>
	<div class='border' style='height: 380px;'>
			<table class='mtable'>
			
				<?php 	
			/*	$row = 0;
				$model->result =  explode("\n", $model->result);
				foreach($model->result as $value){
					if($value != ''){
						$val =  explode(":", $value);
						echo "<tr class='row". $row. "'>" ;
						echo "<td style='font-weight: bold;'><font size='4'>".$val[0]. "</font></td>";
						echo "<td ><font size='4'>".$val[1]. "</font></td>";
						echo "</tr>";
						$row = ($row + 1) %2;
					}
				}
				*/
				echo $model->result;
				?>
			</table>
			
		</div>
	<?php }?>
	
	<center class="row">
			<?php echo $form->error($model,'error'); ?>
	</center>
</div>

  <?php $this->endWidget(); ?><?php endif; ?>